package com.bw.eureka.jpa.service;


import com.bw.eureka.jpa.dao.SysRegionDao;
import com.bw.eureka.jpa.entity.SysRegionEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;

import javax.print.DocFlavor;
import java.util.List;
import java.util.Set;

/**
 * @author qpxbo
 */
@Service
public class SysRegionService {

    @Autowired
    SysRegionDao sysRegionDao;


    @Cacheable(cacheNames = "aaa")
    public List<SysRegionEntity> findAll(){
        List<SysRegionEntity> byParentID = sysRegionDao.findByParentID(1);
        return byParentID;
    }
}
